<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>ArduinoUnit 2.0: Test Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">ArduinoUnit 2.0
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="class_test-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Test Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_arduino_unit_8h_source.html">ArduinoUnit.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Test:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_test.png" usemap="#Test_map" alt=""/>
  <map id="Test_map" name="Test_map">
<area href="class_test_once.html" alt="TestOnce" shape="rect" coords="0,56,66,80"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a34a0e65e4866bfba400f564e9e76a996"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_test.html#a34a0e65e4866bfba400f564e9e76a996">pass</a> ()</td></tr>
<tr class="separator:a34a0e65e4866bfba400f564e9e76a996"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bf0d4600cf540ccd39c12f91e7173de"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_test.html#a5bf0d4600cf540ccd39c12f91e7173de">fail</a> ()</td></tr>
<tr class="separator:a5bf0d4600cf540ccd39c12f91e7173de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2ff3082a0ea33fa0c0ae1aae143d786"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_test.html#af2ff3082a0ea33fa0c0ae1aae143d786">skip</a> ()</td></tr>
<tr class="separator:af2ff3082a0ea33fa0c0ae1aae143d786"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5eed880dda5138db9b40c6a8c3e6b3c3"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_test.html#a5eed880dda5138db9b40c6a8c3e6b3c3">setup</a> ()</td></tr>
<tr class="separator:a5eed880dda5138db9b40c6a8c3e6b3c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62a1398282c8ef41e33e8f35d165f4b0"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_test.html#a62a1398282c8ef41e33e8f35d165f4b0">loop</a> ()=0</td></tr>
<tr class="separator:a62a1398282c8ef41e33e8f35d165f4b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac03bf547d000075ff0ea885ef6945fcf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac03bf547d000075ff0ea885ef6945fcf"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Test</b> (const __FlashStringHelper *_name, uint8_t _verbosity=<a class="el" href="_arduino_unit_8h.html#a05c2ef95b9d1d0dad013969163c8e3cd">TEST_VERBOSITY_TESTS_ALL</a>|<a class="el" href="_arduino_unit_8h.html#a5863a706c9a4beb1e762f21500c89ed1">TEST_VERBOSITY_ASSERTIONS_FAILED</a>)</td></tr>
<tr class="separator:ac03bf547d000075ff0ea885ef6945fcf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90dd4b8e36bb8dbc94de88115ead5848"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a90dd4b8e36bb8dbc94de88115ead5848"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Test</b> (const char *_name, uint8_t _verbosity=<a class="el" href="_arduino_unit_8h.html#a05c2ef95b9d1d0dad013969163c8e3cd">TEST_VERBOSITY_TESTS_ALL</a>|<a class="el" href="_arduino_unit_8h.html#a5863a706c9a4beb1e762f21500c89ed1">TEST_VERBOSITY_ASSERTIONS_FAILED</a>)</td></tr>
<tr class="separator:a90dd4b8e36bb8dbc94de88115ead5848"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:aa574522e4def0269d267ab423d3b2bac"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa574522e4def0269d267ab423d3b2bac"></a>
static uint16_t&#160;</td><td class="memItemRight" valign="bottom"><b>getCurrentPassed</b> ()</td></tr>
<tr class="separator:aa574522e4def0269d267ab423d3b2bac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09902ca8e63d22eb5a11ee77f9e0c6cd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a09902ca8e63d22eb5a11ee77f9e0c6cd"></a>
static uint16_t&#160;</td><td class="memItemRight" valign="bottom"><b>getCurrentSkipped</b> ()</td></tr>
<tr class="separator:a09902ca8e63d22eb5a11ee77f9e0c6cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a82b377c7362903b35c4aa0fd050ed4b0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a82b377c7362903b35c4aa0fd050ed4b0"></a>
static uint16_t&#160;</td><td class="memItemRight" valign="bottom"><b>getCurrentFailed</b> ()</td></tr>
<tr class="separator:a82b377c7362903b35c4aa0fd050ed4b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54c039a164c1c1d97cd73e96bf533e01"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a54c039a164c1c1d97cd73e96bf533e01"></a>
static uint16_t&#160;</td><td class="memItemRight" valign="bottom"><b>getCurrentCount</b> ()</td></tr>
<tr class="separator:a54c039a164c1c1d97cd73e96bf533e01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfe763aab53dbecab02f473b93536347"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_test.html#acfe763aab53dbecab02f473b93536347">include</a> (const char *pattern)</td></tr>
<tr class="separator:acfe763aab53dbecab02f473b93536347"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00269bd7c55b1c93477be06174280b04"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_test.html#a00269bd7c55b1c93477be06174280b04">exclude</a> (const char *pattern)</td></tr>
<tr class="separator:a00269bd7c55b1c93477be06174280b04"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb64a8b970de8b2422b9f56cd8719ca4"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_test.html#abb64a8b970de8b2422b9f56cd8719ca4">run</a> ()</td></tr>
<tr class="separator:abb64a8b970de8b2422b9f56cd8719ca4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a1421a6386ce6b80e34b57b370576a4"><td class="memTemplParams" colspan="2"><a class="anchor" id="a8a1421a6386ce6b80e34b57b370576a4"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:a8a1421a6386ce6b80e34b57b370576a4"><td class="memTemplItemLeft" align="right" valign="top">static bool&#160;</td><td class="memTemplItemRight" valign="bottom"><b>assertion</b> (const __FlashStringHelper *file, uint16_t line, const __FlashStringHelper *lhss, const T &amp;lhs, const __FlashStringHelper *ops, bool(*op)(const T &amp;lhs, const T &amp;rhs), const __FlashStringHelper *rhss, const T &amp;rhs)</td></tr>
<tr class="separator:a8a1421a6386ce6b80e34b57b370576a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a208f71a142dbf9a369cb0f345bc924dc"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_test.html#a208f71a142dbf9a369cb0f345bc924dc">state</a></td></tr>
<tr class="separator:a208f71a142dbf9a369cb0f345bc924dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acff24a84a14b606d01913a4a701ca821"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_test.html#acff24a84a14b606d01913a4a701ca821">name</a></td></tr>
<tr class="separator:acff24a84a14b606d01913a4a701ca821"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0489f064ae55a20229646a584110a39"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_test.html#aa0489f064ae55a20229646a584110a39">verbosity</a></td></tr>
<tr class="separator:aa0489f064ae55a20229646a584110a39"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:aad3dc21628f5210b9ebdf843eb2b2ae0"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_test.html#aad3dc21628f5210b9ebdf843eb2b2ae0">max_verbosity</a> = <a class="el" href="_arduino_unit_8h.html#a2c97afa819205922cdb858460c8e61c9">TEST_VERBOSITY_ALL</a></td></tr>
<tr class="separator:aad3dc21628f5210b9ebdf843eb2b2ae0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ff0e4cf27254c988233880fff9e6c6d"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_test.html#a1ff0e4cf27254c988233880fff9e6c6d">min_verbosity</a> = <a class="el" href="_arduino_unit_8h.html#ac1041a1c1013e91e58398902e76ed955">TEST_VERBOSITY_TESTS_SUMMARY</a></td></tr>
<tr class="separator:a1ff0e4cf27254c988233880fff9e6c6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73b64ff82076551c6a66f17bed82c1b4"><td class="memItemLeft" align="right" valign="top">static const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_test.html#a73b64ff82076551c6a66f17bed82c1b4">UNSETUP</a> = 0</td></tr>
<tr class="separator:a73b64ff82076551c6a66f17bed82c1b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad547575fc6e8ad71bb39542c1abeb7fd"><td class="memItemLeft" align="right" valign="top">static const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_test.html#ad547575fc6e8ad71bb39542c1abeb7fd">LOOPING</a> = 1</td></tr>
<tr class="separator:ad547575fc6e8ad71bb39542c1abeb7fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7ee7b197c214e110e13537bc0b277e2"><td class="memItemLeft" align="right" valign="top">static const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_test.html#af7ee7b197c214e110e13537bc0b277e2">DONE_SKIP</a> = 2</td></tr>
<tr class="separator:af7ee7b197c214e110e13537bc0b277e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1a131191af040400d33ea8f8b2c25af"><td class="memItemLeft" align="right" valign="top">static const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_test.html#ab1a131191af040400d33ea8f8b2c25af">DONE_PASS</a> = 3</td></tr>
<tr class="separator:ab1a131191af040400d33ea8f8b2c25af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ad0055670d3ae4babadc094002c17fd"><td class="memItemLeft" align="right" valign="top">static const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_test.html#a4ad0055670d3ae4babadc094002c17fd">DONE_FAIL</a> = 4</td></tr>
<tr class="separator:a4ad0055670d3ae4babadc094002c17fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33e59751992ec1a8a65745c0b6b144b0"><td class="memItemLeft" align="right" valign="top">static Print *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">out</a> = &amp;Serial</td></tr>
<tr class="separator:a33e59751992ec1a8a65745c0b6b144b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab33c60d07c2338204a0bafe40f995177"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_test.html">Test</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_test.html#ab33c60d07c2338204a0bafe40f995177">current</a> = 0</td></tr>
<tr class="separator:ab33c60d07c2338204a0bafe40f995177"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>There are two convenience macros for extending this class and implement a one-step test (test macro), or a multi-step test (testing macro).</p>
<p>One shot (first <a class="el" href="class_test.html#a62a1398282c8ef41e33e8f35d165f4b0">loop()</a>) test </p>
<pre class="fragment">test(me_once) 
{
  int x=1,y=2;
  assertNotEqual(x,y);
}
</pre><p>Continuous (every <a class="el" href="class_test.html#a62a1398282c8ef41e33e8f35d165f4b0">loop()</a> until <a class="el" href="class_test.html#a34a0e65e4866bfba400f564e9e76a996">pass()</a>, <a class="el" href="class_test.html#a5bf0d4600cf540ccd39c12f91e7173de">fail()</a>, or <a class="el" href="class_test.html#af2ff3082a0ea33fa0c0ae1aae143d786">skip()</a>) test </p>
<pre class="fragment">testing(me_often) {
  assertEqual(digitalRead(errorPin),LOW);
}
</pre><p>Roll-your-own test: </p>
<pre class="fragment">class MyTest : public Test {
public:
  MyTest(const char *name) : Test(name) {} { 
</pre><p> can set verbosity here. } void <a class="el" href="class_test.html#a5eed880dda5138db9b40c6a8c3e6b3c3">setup()</a> { can set verbosity here. call call <a class="el" href="class_test.html#a34a0e65e4866bfba400f564e9e76a996">pass()</a>, <a class="el" href="class_test.html#a5bf0d4600cf540ccd39c12f91e7173de">fail()</a>, or <a class="el" href="class_test.html#af2ff3082a0ea33fa0c0ae1aae143d786">skip()</a> can make assertions } void <a class="el" href="class_test.html#a62a1398282c8ef41e33e8f35d165f4b0">loop()</a> { can set verbosity here. call call <a class="el" href="class_test.html#a34a0e65e4866bfba400f564e9e76a996">pass()</a>, <a class="el" href="class_test.html#a5bf0d4600cf540ccd39c12f91e7173de">fail()</a>, or <a class="el" href="class_test.html#af2ff3082a0ea33fa0c0ae1aae143d786">skip()</a> can make assertions } };</p>
<p>void <a class="el" href="class_test.html#a5eed880dda5138db9b40c6a8c3e6b3c3">setup()</a> { all tests are included by default <a class="el" href="class_test.html#a00269bd7c55b1c93477be06174280b04">Test::exclude</a>("*_skip"); if (no_slow_tests) <a class="el" href="class_test.html#a00269bd7c55b1c93477be06174280b04">Test::exclude</a>("*_slow"); if (all_crypto_tests) { <a class="el" href="class_test.html#acfe763aab53dbecab02f473b93536347">Test::include</a>("crypto_*"); <a class="el" href="class_test.html#a00269bd7c55b1c93477be06174280b04">Test::exclude</a>("crypto_*_skip"); } }</p>
<p>void <a class="el" href="class_test.html#a62a1398282c8ef41e33e8f35d165f4b0">loop()</a> { <a class="el" href="class_test.html#abb64a8b970de8b2422b9f56cd8719ca4">Test::run()</a>; }</p>
<p>Variables you might want to adjust: </p>
<pre class="fragment">static Print* Test::out
</pre><ul>
<li>the stream that is used for output</li>
<li>defaults to <pre class="fragment">&amp;Serial
</pre></li>
</ul>
<ul>
<li><p class="startli">This affects the output of all tests</p>
<p class="startli">uint8_t verbosity</p>
</li>
</ul>
<ul>
<li>how much to report on output</li>
</ul>
<p>&ndash; defaults to </p>
<pre class="fragment">  TEST_VERBOSITY_ASSERTIONS_FAILED|TEST_VERBOSITY_TESTS_ALL
</pre><p>&ndash; to keep code small, reporting code that is not set in </p>
<pre class="fragment">  TEST_MAX_VERBOSITY
</pre><p>is removed, so setting verbosity bits outside this mask has no effect. The default mask is to have all output available, and the only reason to change this is to save some code space. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a00269bd7c55b1c93477be06174280b04"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Test::exclude </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>pattern</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>exclude (skip) currently included tests that match some wildcard (*) pattern like, </p>
<pre class="fragment">  "my_broken_test", "*_skip", "*", "io_*", etc.  
</pre><p>This should be done inside your <a class="el" href="class_test.html#a5eed880dda5138db9b40c6a8c3e6b3c3">setup()</a> function. </p>

</div>
</div>
<a class="anchor" id="a5bf0d4600cf540ccd39c12f91e7173de"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Test::fail </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set state to DONE_FAIL. This does not exit the code early. But after the <a class="el" href="class_test.html#a62a1398282c8ef41e33e8f35d165f4b0">loop()</a> terminates, the test will be resolved and removed from the list of active tests. </p>

</div>
</div>
<a class="anchor" id="acfe763aab53dbecab02f473b93536347"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Test::include </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>pattern</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<pre class="fragment">include (use) currently excluded (skipped) tests that match some
</pre><p> wildcard (*) pattern like, </p>
<pre class="fragment">"dev_*", "my_main_test", "*_quick"
</pre><p>Since all tests are included by default, this is not useful except after an <a class="el" href="class_test.html#a00269bd7c55b1c93477be06174280b04">exclude()</a> call.</p>
<p>This should be done inside your <a class="el" href="class_test.html#a5eed880dda5138db9b40c6a8c3e6b3c3">setup()</a> function. </p>

</div>
</div>
<a class="anchor" id="a62a1398282c8ef41e33e8f35d165f4b0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Test::loop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Run a test. <a class="el" href="class_test.html#a62a1398282c8ef41e33e8f35d165f4b0">Test::loop()</a> will be called on each <a class="el" href="class_test.html#abb64a8b970de8b2422b9f56cd8719ca4">Test::run()</a> until a <a class="el" href="class_test.html#a34a0e65e4866bfba400f564e9e76a996">pass()</a>, <a class="el" href="class_test.html#a5bf0d4600cf540ccd39c12f91e7173de">fail()</a> or <a class="el" href="class_test.html#af2ff3082a0ea33fa0c0ae1aae143d786">skip()</a>. </p>

<p>Implemented in <a class="el" href="class_test_once.html#a602e32762fb5bf103bb1371a3dc12eed">TestOnce</a>.</p>

</div>
</div>
<a class="anchor" id="a34a0e65e4866bfba400f564e9e76a996"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Test::pass </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set state to DONE_PASS. This does not exit the code early. But after the <a class="el" href="class_test.html#a62a1398282c8ef41e33e8f35d165f4b0">loop()</a> terminates, the test will be resolved and removed from the list of active tests. </p>

</div>
</div>
<a class="anchor" id="abb64a8b970de8b2422b9f56cd8719ca4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Test::run </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Simple usage: </p>
<pre class="fragment">void setup() {
  Serial.begin(9600);
}

void loop() {
  Test::run();
}
</pre><p>Complex usage: </p>
<pre class="fragment">void setup() {
  Test::exclude("*"); // exclude everything
  Test::include("io_*"); // but include io_* tests
  Test::exclude("io_*_lcd"); // except io_*_lcd tests
  Test::include("crypto_*_aes128"); // and use all crypto_*_aes128 tests
}
</pre><p>void <a class="el" href="class_test.html#a62a1398282c8ef41e33e8f35d165f4b0">loop()</a> { <a class="el" href="class_test.html#abb64a8b970de8b2422b9f56cd8719ca4">Test::run()</a>; } </p>

</div>
</div>
<a class="anchor" id="a5eed880dda5138db9b40c6a8c3e6b3c3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Test::setup </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Setup a test. This is an nop {} definition by default, but for some more general cases it will be called once from before continuously calling <a class="el" href="class_test.html#a62a1398282c8ef41e33e8f35d165f4b0">Test::loop()</a>. You can <a class="el" href="class_test.html#af2ff3082a0ea33fa0c0ae1aae143d786">skip()</a>, <a class="el" href="class_test.html#a34a0e65e4866bfba400f564e9e76a996">pass()</a>, <a class="el" href="class_test.html#a5bf0d4600cf540ccd39c12f91e7173de">fail()</a>, set verbosities, or make assertions here. </p>

</div>
</div>
<a class="anchor" id="af2ff3082a0ea33fa0c0ae1aae143d786"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Test::skip </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set state to DONE_SKIP. This does not exit the code early. But after the <a class="el" href="class_test.html#a62a1398282c8ef41e33e8f35d165f4b0">loop()</a> terminates, the test will be resolved and removed from the list of active tests. </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="ab33c60d07c2338204a0bafe40f995177"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_test.html">Test</a> * Test::current = 0</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The current active test (=0 if none are active). Asserts are allowed outside of tests, but just return if fail and potentially (according to min_verbosity and max_verbosity) print a message to the <a class="el" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">Test::out</a> stream. </p>

</div>
</div>
<a class="anchor" id="a4ad0055670d3ae4babadc094002c17fd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const uint8_t Test::DONE_FAIL = 4</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>State of a failed test. </p>

</div>
</div>
<a class="anchor" id="ab1a131191af040400d33ea8f8b2c25af"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const uint8_t Test::DONE_PASS = 3</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>State of a passed test. </p>

</div>
</div>
<a class="anchor" id="af7ee7b197c214e110e13537bc0b277e2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const uint8_t Test::DONE_SKIP = 2</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>State of a test that will be counted as skipped. This can be done any time before resolving the test some other way, but should mean some small amount of steps to determine that no actual testing was done. </p>

</div>
</div>
<a class="anchor" id="ad547575fc6e8ad71bb39542c1abeb7fd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const uint8_t Test::LOOPING = 1</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>State of a test while actively in <a class="el" href="class_test.html#a62a1398282c8ef41e33e8f35d165f4b0">loop()</a>. Tests are resolved by changing state one of the DONE_ states. </p>

</div>
</div>
<a class="anchor" id="aad3dc21628f5210b9ebdf843eb2b2ae0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t Test::max_verbosity = <a class="el" href="_arduino_unit_8h.html#a2c97afa819205922cdb858460c8e61c9">TEST_VERBOSITY_ALL</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>After the compile-time-mask TEST_MAX_VERBOSITY, this is a global run-time-mask of what output should be generated. </p>

</div>
</div>
<a class="anchor" id="a1ff0e4cf27254c988233880fff9e6c6d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t Test::min_verbosity = <a class="el" href="_arduino_unit_8h.html#ac1041a1c1013e91e58398902e76ed955">TEST_VERBOSITY_TESTS_SUMMARY</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>After the compile-time-mask TEST_MAX_VERBOSITY, and the global (static) run-time-mask <a class="el" href="class_test.html#aad3dc21628f5210b9ebdf843eb2b2ae0">Test::max_verbosity</a> of what output can be generated, this is a global (static) run-time-mask of what output should be generated. </p>

</div>
</div>
<a class="anchor" id="acff24a84a14b606d01913a4a701ca821"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">String Test::name</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>the name of this test </p>

</div>
</div>
<a class="anchor" id="a33e59751992ec1a8a65745c0b6b144b0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Print * Test::out = &amp;Serial</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>/brief Output stream for all tests. The default value of this is ``` <a class="el" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">Test::out</a> =  ``` This places the output on the main serial port. The library does not set the baud rate, so you must do so in your <a class="el" href="class_test.html#a5eed880dda5138db9b40c6a8c3e6b3c3">setup()</a>.</p>
<p>To redirect all output to some other stream, say the Serial3 device of the arduino mega, use </p>
<pre class="fragment">Serial3.begin(19200L);
Test::out = &amp;Serial3;
</pre><p>in your <a class="el" href="class_test.html#a5eed880dda5138db9b40c6a8c3e6b3c3">setup()</a>. </p>

</div>
</div>
<a class="anchor" id="a208f71a142dbf9a369cb0f345bc924dc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t Test::state</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The current state of this test. It is one of: </p>
<pre class="fragment"> UNSETUP, LOOPING, DONE_PASS, DONE_FAIL, DONE_SKIP</pre> 
</div>
</div>
<a class="anchor" id="a73b64ff82076551c6a66f17bed82c1b4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const uint8_t Test::UNSETUP = 0</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>State of a test before a <a class="el" href="class_test.html#a5eed880dda5138db9b40c6a8c3e6b3c3">setup()</a> call. The <a class="el" href="class_test.html#a00269bd7c55b1c93477be06174280b04">exclude()</a> function may move a test directly from UNSETUP to DONE_SKIP. </p>

</div>
</div>
<a class="anchor" id="aa0489f064ae55a20229646a584110a39"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t Test::verbosity</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Per-test verbosity defaults to TEST_VERBOSITY_TESTS_ALL|TEST_VERBOSITY_ASSERTS_FAILED, but note that the compile-time constant TEST_VERBOSITY_MAX and run-time global (static) values <a class="el" href="class_test.html#aad3dc21628f5210b9ebdf843eb2b2ae0">Test::max_verbosity</a> and <a class="el" href="class_test.html#a1ff0e4cf27254c988233880fff9e6c6d">Test::min_verbosity</a> also effect the verbosity of a test. According to the following rules:</p>
<p>output = false; if (TEST_MAX_VERBOSITY bit is set (output KIND exists)) { if (all-test <a class="el" href="class_test.html#aad3dc21628f5210b9ebdf843eb2b2ae0">Test::max_verbosity</a> bit is set (output KIND allowed)) { if (all-test <a class="el" href="class_test.html">Test</a>:min_verbosity bit is set (output KIND required)) { output = true; } else if (per-test <a class="el" href="class_test.html#aa0489f064ae55a20229646a584110a39">Test::verbosity</a> bit is set (output KIND use)) { output = true; } } }</p>
<p>if (output) { OUTPUT to <a class="el" href="class_test.html#a33e59751992ec1a8a65745c0b6b144b0">Test::out</a> } </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/<a class="el" href="_arduino_unit_8h_source.html">ArduinoUnit.h</a></li>
<li>src/utility/ArduinoUnit.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Mar 12 2013 17:50:17 for ArduinoUnit 2.0 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3.1
</small></address>
</body>
</html>
